HAL: serial nor: more guards in case of WSPI - #61
Merged
dron0gus merged 1 commit intoJul 12, 2025
Merged
Conversation
dron0gus
pushed a commit
to dron0gus/ChibiOS
that referenced
this pull request
Sep 4, 2026
…usefi#66) 🤖 chibios-sheriff — backport (advisory) Backport of **rusefi#61** (main commit `2447f6a`) to `stable-21.11.x`. Stable's `ch.hpp` carries the same defects, so this is a real fix backport. **Fixes** - `Scheduler::rescheduleS()` now actually calls `chSchRescheduleS()` (was a no-op function *declaration*). - Typed `Mailbox<T>` `fetch`/`peek` no longer overrun the caller's storage when `sizeof(T) < sizeof(msg_t)` — the **memory-corruption** fix (fetch into a local `msg_t`, narrow on `MSG_OK`); `post`/`peek` use value casts. - `ObjectsPool` rounds its object size up to pointer alignment (the free-list stores a next-pointer per slot). - The synchronization wrappers are no longer copyable, and the `Registry::nextThread()` reference handoff is corrected. **Adaptation:** none — cherry-pick auto-merged cleanly (stable's `ch.hpp` matches main's structure). The `nextThread` handoff fix is semantically correct here because stable's registry iterators are reference-counting since rusefi#54. **Local gates** (stable has no CI): `RT-STM32F407-DISCOVERY-G++` builds clean (g++ 14.3.1); a compile-only probe instantiating `Mailbox<uint8_t,8>` and `ObjectsPool<uint8_t,4>` (`post`/`fetch`/`alloc`) compiles clean — exercising the small-T template fixes. (`.hpp` is not in the CI style glob.) **Changelog:** none — `os/various/cpp_wrappers` is not changelog-tracked (matches rusefi#61 on main, which added no entry). Sheriff-authored backport — a human reviews/merges. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rusefillc
pushed a commit
that referenced
this pull request
Sep 21, 2026
…66) 🤖 chibios-sheriff — backport (advisory) Backport of **#61** (main commit `2447f6a`) to `stable-21.11.x`. Stable's `ch.hpp` carries the same defects, so this is a real fix backport. **Fixes** - `Scheduler::rescheduleS()` now actually calls `chSchRescheduleS()` (was a no-op function *declaration*). - Typed `Mailbox<T>` `fetch`/`peek` no longer overrun the caller's storage when `sizeof(T) < sizeof(msg_t)` — the **memory-corruption** fix (fetch into a local `msg_t`, narrow on `MSG_OK`); `post`/`peek` use value casts. - `ObjectsPool` rounds its object size up to pointer alignment (the free-list stores a next-pointer per slot). - The synchronization wrappers are no longer copyable, and the `Registry::nextThread()` reference handoff is corrected. **Adaptation:** none — cherry-pick auto-merged cleanly (stable's `ch.hpp` matches main's structure). The `nextThread` handoff fix is semantically correct here because stable's registry iterators are reference-counting since #54. **Local gates** (stable has no CI): `RT-STM32F407-DISCOVERY-G++` builds clean (g++ 14.3.1); a compile-only probe instantiating `Mailbox<uint8_t,8>` and `ObjectsPool<uint8_t,4>` (`post`/`fetch`/`alloc`) compiles clean — exercising the small-T template fixes. (`.hpp` is not in the CI style glob.) **Changelog:** none — `os/various/cpp_wrappers` is not changelog-tracked (matches #61 on main, which added no entry). Sheriff-authored backport — a human reviews/merges. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.